using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Dogfight2008
{
  public class StateUtil
  {
    public static void RenderNiceCenterText(
      IRenderer renderer,
      string text)
    {
      RenderNiceText(renderer, text, 0.5, 0.5, 0.3, Color.Yellow, Color.DarkBlue);
    }

    public static void RenderNiceText(
      IRenderer renderer,
      string text,
      double x,
      double y,
      double height,
      Color fgcolor,
      Color bgcolor)
    {
      renderer.Color(bgcolor);
      renderer.TextAt(
        text,
        new Uniform(x),
        new Uniform(y),
        new Uniform(height),
        Anchor.Center);
      renderer.Color(fgcolor);
      renderer.TextAt(
        text,
        new Uniform(x-0.002),
        new Uniform(y-0.002),
        new Uniform(height),
        Anchor.Center);
    }
  }
}
